From 66303d4508199eaec47f75066438979dcc602cd8 Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Thu, 25 Aug 2005 13:58:27 +0000 Subject: [PATCH] Modified to include new information --- gpsbabel/intdoc/SA2003_an1_dump.pl | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/gpsbabel/intdoc/SA2003_an1_dump.pl b/gpsbabel/intdoc/SA2003_an1_dump.pl index 5bbb690d1..8bd7ce323 100644 --- a/gpsbabel/intdoc/SA2003_an1_dump.pl +++ b/gpsbabel/intdoc/SA2003_an1_dump.pl @@ -77,9 +77,20 @@ END while ( $bitmapcount ) { ($rec_type) = shiftunpack( 's' ); if ( $rec_type == 0x4c49 ) { # 'IL' - # I don't know what this structure is, but it appears twice in my test files. - ($unk10101, $unke, $unkc, $unk18_1, $unk18_2, $unkneg1_1, - $unk20, $unkneg1_2, $unkneg1_3) = shiftunpack( 'lsssslsll'); + # This is a Windows ImageList stream. It actually includes the + # 'BM' structures following in the stream, so we could be smarter + # about how many we expect to find. (2 if bit 0 of ilflags is set, + # 1 otherwise. That bit is ILD_MASK.) For now, though, this works + # just fine. Newer versions of the IL structure supposedly contain + # more overlay indices, but SA always seems to use the 0x101 version. + + # Documentation on the stream format is hard to come by. I found + # mine in the form of the WINE project's reimplementation of comctl32. + + ($ilVersion, $ilCount, $ilMax, $ilGrow, $ilcx, $ilcy, + $ilbkColor, $ilflags, $ilovl1, $ilovl2, $ilovl3, $ilovl4 ) = + shiftunpack( 'sssssslsssss' ); + printf( "ver %x count %d max %d grow %d cx %d cy %d bkcolor %x flags %x\n", $ilVersion, $ilCount, $ilMax, $ilGrow, $ilcx, $ilcy, $ilbkColor, $ilflags ); } elsif ( $rec_type == 0x4d42 ) { # 'BM' # This is a standard BMP file, documented in MSDN. @@ -114,7 +125,7 @@ while ( $bitmapcount ) { # fix the hotspot X coord $hotspotx = $rec_type + 0x10000*$hotspotxhi; - printf( "Image: %2d %2d %s $name\n", $hotspotx, $hotspoty, decodeGuid( $guid ) ); + printf( "Image: %2d %2d %s %x $name\n", $hotspotx, $hotspoty, decodeGuid( $guid ), $unk1 ); $imagenames{$guid} = $name; $bitmapcount--; } -- 2.30.2